package com.glodon.paas.registry.demo.provider;

import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;

import java.net.InetSocketAddress;
import java.util.concurrent.Executors;

/**
 * Service provider which provides http API to consumers.
 *
 * @author Don Li
 */
public class ServiceProvider {
    public static void main(String[] args) {
        ServerBootstrap bootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(
                Executors.newCachedThreadPool(), Executors.newCachedThreadPool()
        ));
        bootstrap.setPipelineFactory(new SslServerPipelineFactory());
        bootstrap.bind(new InetSocketAddress(8443));
    }
}
